package com.usefullc.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.usefullc.blog.domain.Article;
import com.usefullc.system.entity.Pager;
import io.lettuce.core.dynamic.annotation.Param;
import java.util.List;

public interface ArticleMapper extends BaseMapper<Article> {

//useful_auto_generate_section_start


    int setReply(@Param("ids") List<Long> ids, @Param("status") Integer status);


    int setRecommend(@Param("ids") List<Long> ids, @Param("status") Integer status);


    int setTop(@Param("ids") List<Long> ids, @Param("status") Integer status);


    int updateContributionStatus(@Param("ids") List<Long> ids, @Param("status") Integer status);


    int updateStatus(@Param("ids") List<Long> ids, @Param("status") Integer status);


//useful_auto_generate_section_end

    int updateActionNum(@Param("id") Long id, @Param("readNum") long readNum, @Param("likeNum") long likeNum, @Param("replyNum") long replyNum, @Param("shareNum") long shareNum);

    List<Article> findByTagId(@Param("tagId") Long tagId, @Param("pager") Pager pager);

    long findCountByTagId(@Param("tagId") Long tagId);

}
